/* 预展，当前拍卖接口 */

const {
  selectAuctionProductTypeInfo,
  selectSpecialProductInfo,
  putReadyInfo,
  putSignUpInfo,
  putCollectInfo
} = require('../model/auctionProduct');

/* 获取拍卖专场分类信息 */
let getAuctionProductTypeInfo = async (ctx, next) => {
  selectAuctionProductTypeInfo(ctx, next);
};
/* 获取拍卖专场信息 */
let getSpecialProductInfo = async (ctx, next) => {
  selectSpecialProductInfo(ctx, next);
};

/* 修改专场准备状态信息 */
let updateReadyInfo = async (ctx, next) => {
  putReadyInfo(ctx, next);
};

/* 修改报名专场状态信息 */
let updateSignUpInfo = async (ctx, next) => {
  putSignUpInfo(ctx, next);
};

/* 修改专场收藏状态信息 */
let updateCollectInfo = async (ctx, next) => {
  putCollectInfo(ctx, next);
};

/* 注意请求方式后面的空格 */
module.exports = {
  'GET /auction/type': getAuctionProductTypeInfo,
  'GET /auction': getSpecialProductInfo,
  'PUT /auction/ready/:id': updateReadyInfo,
  'PUT /auction/signUp/:id': updateSignUpInfo,
  'PUT /auction/Collect/:id': updateCollectInfo
};